/**
 * Created by wangzilong on 2017/4/11.
 */
import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    Image,
    ScrollView,
    TouchableOpacity,
    TextInput,
    ListView,
    Modal,
    Animated,
    Platform
} from 'react-native';
import ImageWrapper from './ImageWrapper';
var Dimensions = require('Dimensions');
const { width, height } = Dimensions.get('window');

export default class ButtonItem extends Component{

    render(){
        return (
            <View style={[styles.messageBox,this.props.style]}>
                <View style={{flex:1}}>
                    <Text style={this.props.textStyle || {fontSize:16,color:'#151515'}}>{this.props.title}</Text>
                </View>
                <View  style={{marginRight:10}}>
                    <TouchableOpacity onPress={this.props.onPress}>
                        <ImageWrapper width={40} height={40} icon={this.props.icon}/>
                    </TouchableOpacity>
                </View>
            </View>
        )

    }

}


const styles = StyleSheet.create({
    messageBox:{
        flexDirection:'row',
        alignItems:'center',
        height:40
    } 
    
});